jQuery(document).ready(function($) {
if(typeof(Worker) == "undefined"){window.location = "noHtml5";}
animateImg();
function animateImg(){
  new WOW().init();
}
//$(".dropdown-menu").addClass("fadeInDown").show();
//if($(".m2prou1Bom").size()>0){autoH(".m2prou1Bom");}

if($(".m2pul_aBox p").size()>0){autoH(".m2pul_aBox p");}
if($(".hmc1_aBox p").size()>0){autoH(".hmc1_aBox p");}
if($(".m2pc3Des").size()>0){autoH(".m2pc3Des");}

//hmFocus170324
var hmFocus170324 = new Swiper('.hmFocus170324', {
	pagination: '.hmFocus170324 .swiper-pagination',
	nextButton: '.hmFocus170324 .hmFocusBtnR',
	prevButton: '.hmFocus170324 .hmFocusBtnL',
	paginationClickable: true,
	onlyExternal : false,
	autoplay: 6000,
    //effect: 'fade',
	autoplayDisableOnInteraction : false,
	speed: 1000,
	spaceBetween: 0,
	loop: true,
	onInit: function(swiper){ 
		swiperAnimateCache(swiper); 
		swiperAnimate(swiper); 
	  }, 
    onSlideChangeEnd: function(swiper){ 
		swiperAnimate(swiper);
	}
});


if($(".m2kh_sbox").size()>0){
autoW();
$(window).resize(function(){
	autoW();
	});	
}
	
var hmhzSwiper = new Swiper('.hmhzSwiper .swiper-container', {
	pagination: '.hmhzSwiper .swiper-pagination',
	nextButton: '.hmhzSwiper .next',
	prevButton: '.hmhzSwiper .prev',
	slidesPerView: 1,
	paginationClickable: true,
	spaceBetween: 0,
	loop: true
});


});

//百度分享
window._bd_share_config = { "common": { "bdSign": "off", "bdSize": "24" }, "share": { "bdCustomStyle": "" } }
with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion=' + ~(-new Date() / 36e5)];

function autoW(){
	$(".m2kh_sbox").height($(".m2kh_sbox").width());
	}

function picTxtHeight() {
$(".picTxtBox").each(function(i){if($(this).find(".txtBox").height()>$(this).find(".picBox").height()){$(this).height($(this).find(".txtBox").height());}else{$(this).height($(this).find(".picBox").height());}$(this).find(".picBox-wp,.txtBox-wp").css("min-height",$(this).height())})}
if($(document).width()>767){
	picTxtHeight();
}
$(window).resize(function(){
	if($(document).width()>767){
		picTxtHeight();
	}
})

function autoH(className){
	var maxH = 0;
	$(className).each(function() {
    var cutH = $(this).innerHeight();
	if(cutH>maxH){
		maxH = cutH;
		}
    });

    $(className).innerHeight(maxH);
}

//屏蔽页面错误
jQuery(window).error(function(){
  return true;
});
jQuery("img").error(function(){
  $(this).hide();
});
